<?php

$hakakses = array(
    1 => 'Tata Usaha', 
    2 => 'Kepala Balai',
    3 => 'Unit Kerja'
);

$status = array(
    1 => 'Aktif', 
    2 => 'Non Aktif'
);

foreach ($data_pegawai as $row){
?>
<div align="center" id="form">
    <h1>Edit Data User</h1>
    <?php echo form_open('Site/validasi_simpan_perubahan_pegawai'); ?>
    <table border="0">
        <tr>
            <td>No Induk</td>
            <td>:</td>
            <td><?php echo form_input('i_id_pegawai', $row->IDPEGAWAI).form_error('i_id_pegawai'); ?></td>
        </tr>
        <tr>
            <td>Nama Lengkap</td>
            <td>:</td>
            <td><?php echo form_input('i_nama_pegawai', $row->NAMAPEGAWAI).form_error('i_nama_pegawai'); ?></td>
        </tr>
        <tr>
            <td>Password</td>
            <td>:</td>
            <td><?php echo form_input('i_password', $row->PASSWORD).form_error('i_password'); ?></td>
        </tr>
        <tr>
            <td>Jabatan</td>
            <td>:</td>
            <td><?php echo form_dropdown('i_hak_akses', $hakakses, $row->HAKAKSES); ?></td>
        </tr>
        <tr>
            <td>Status</td>
            <td>:</td>
            <td><?php echo form_dropdown('i_status_pegawai', $status, $row->STATUSPEGAWAI); ?></td>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td><?php echo form_submit('i_simpan', 'Simpan'); ?></td>
        </tr>
    </table>
<?php 
echo form_close(); 
}
?>
</div>